var pageii = null;
var grid = null;
$(function() {
	grid = lyGrid({
		pagId : 'paging',
		l_column : [ {
			colkey : "id",
			name : "id"
		},{
			colkey : "Date",
			name : "日期",
			renderData : function(rowindex,data, rowdata, column) {	
				if(data!=''){
					return new Date(data).format("yyyy-MM-dd hh:mm:ss");	
				}else{
					return "";
			};					
		}
		},{
			colkey : "Machine_Number",
			name : "机台号"
		},{
			colkey : "Mold_Number",
			name : "模具号"
		},{
			colkey : "CheckContent",
			name : "点检内容"
		},{
			colkey : "Spot_Checker",
			name : "点检人"
		},{
			colkey : "SpotCheck",
			name : "确认点检",
			renderData : function(rowindex,data, rowdata, column) {	
				if(data==1){
					return "已确认";	
				}else{
					return "未确认";
			};					
		}
		},{
			colkey : "Status",
			name : "状态"
		},{
			colkey : "operation",
			name : "操作"
		},],
		jsonUrl : rootPath + '/handover/inspect_findByPage.shtml',
		dymCol:true,
		checkbox : true,
		serNumber : false
	});
	
	$("#search").click("click", function() {// 绑定查询按扭
		var searchParams = $("#searchForm").serializeJson();
		grid.setOptions({
			data : searchParams
		});
	});
	
});

function editItemAccount() {
	pageii = layer.open({
		title : "修改点检项目内容",
		type : 2,
		area : [ "800px", "100%" ],
		content : rootPath + '/handover/inspect_editItem.shtml'
	});
}
